package com.ruoyi.law.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.law.domain.entity.LawTeamService;
import com.ruoyi.law.mapper.LawTeamServiceMapper;
import com.ruoyi.law.service.ILawTeamServiceService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 团队人员和服务范围关系表 服务实现类
 * </p>
 *
 * @author code
 * @since 2022-12-29
 */
@Service
public class LawTeamServiceServiceImpl extends ServiceImpl<LawTeamServiceMapper, LawTeamService> implements ILawTeamServiceService {

    @Override
    public boolean removeByTeamId(Long teamId) {
        LambdaQueryWrapper<LawTeamService> queryWrapper = new LambdaQueryWrapper<>();
        return super.remove(queryWrapper.eq(LawTeamService::getTeamId, teamId));
    }

    @Override
    public List<LawTeamService> listByTeamId(Long teamId) {
        LambdaQueryWrapper<LawTeamService> queryWrapper = new LambdaQueryWrapper<>();
        return super.list(queryWrapper.eq(LawTeamService::getTeamId, teamId));
    }
}
